/**
 * @author liangxi
 * @since 2023/12/21
 */

#ifndef DESIGNPATTERN_NYPIZZASTORE_H
#define DESIGNPATTERN_NYPIZZASTORE_H


#include "../../Pizza/PizzaFM.h"
#include "../PizzaStoreFM.h"
#include "../../Pizza/Impl/NYStyleCheesePizza.h"
#include "../../Pizza/Impl/NYStyleVeggiePizza.h"
#include "../../Pizza/Impl/NYStyleClamPizza.h"
#include "../../Pizza/Impl/NYStylePepperoniPizza.h"

namespace Factory_FM {
    class NYPizzaStore : public Factory_FM::PizzaStoreFM {
    public:
        std::shared_ptr<PizzaFM> createPizza(const std::string &type) override {
            if (type == "cheese") {
                return std::make_shared<Factory_FM::NYStyleCheesePizza>();
            } else if (type == "veggie") {
                return std::make_shared<Factory_FM::NYStyleVeggiePizza>();
            } else if (type == "clam") {
                return std::make_shared<Factory_FM::NYStyleClamPizza>();
            } else if (type == "pepperoni") {
                return std::make_shared<Factory_FM::NYStylePepperoniPizza>();
            }
            return {};
        }

    public:
    };
}


#endif //DESIGNPATTERN_NYPIZZASTORE_H
